package com.annotation;

import com.annotation.controller.UserController;
import com.annotation.repository.UserRepository;
import com.annotation.service.UserSrevice;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext ioc = new ClassPathXmlApplicationContext("annotation.xml");
        TestObject to = (TestObject) ioc.getBean("testObject");
        System.out.println(to);

        UserController userController = (UserController) ioc.getBean("userController");
        System.out.println(userController);

        UserRepository userRepository = (UserRepository) ioc.getBean("UserRepository");
        System.out.println(userRepository);

        UserSrevice userSrevice = (UserSrevice) ioc.getBean("userSrevice");
        System.out.println(userSrevice);



    }
}
